<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
    stFacebookToolbox.on_submitform('#settingForm');

</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
                <ul class="menu_right">
                      <li>
                          <a href="javascript:void(0);" onclick="stFacebookToolboxcustom.loadPage('feed_to_tab');" id="settings">Settings</a>
                    </li>
                      <li class="current">
                          <a href="javascript:void(0);" onclick="stFacebookToolboxcustom.loadPage('feed_categories');" id="categories"> Categories set-up</a>
                    </li>
                      <li>
                   <a href="javascript:void(0);" onclick="stFacebookToolboxcustom.loadPage('feed_statistics');" id="statistics"> Statistics tab</a>
                    </li>
                </ul>

                    <h2 class="red_color" style="padding-left:15px;">Categories settings
            </h2>
       <form class="stform" id="settingForm" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" >
                <ul>
                     <?php  $args = array(
                'type'                     => 'post',
                'hide_empty'               => 0
                );
            $stt = 0;
            $categories = get_categories( $args );
            foreach($categories as $category):?>
                    <li>
                        <label><?php _e($category->name, $config['plugin_name'])?>:</label>
                        <div>
                           <input <?php if ($option[$category->cat_ID] == "1"){echo 'checked';}?> title="<?php echo $category->name; ?>" value="1" class="" name="data[<?php echo $category->cat_ID; ?>]" id="category" type="checkbox" tabindex="7" />
                        </div>
                        <br clear="both" />
                    </li>
                    <?php endforeach;?>
                    <input type="hidden" name="data[check]" value="check" />
                    <li>
                        <input type="submit" value="Save"/>
                    </li>


                </ul>
        </form>

    </div>
</div>